$(document).ready(function() {

    $('.btn_vote').click(function() {  
        $.post('vote.htm', {
            "link" : this.name
        }, function(resp) {
            if (resp.status==0) {
                $('#vc_' + resp.data.link).text(resp.data.voteCount);
            } else {
                alert(resp.message);
            }
        });
    });
});
$(function() {
    var path = window.location.pathname;
    var s = path.lastIndexOf('/');
    var e = path.lastIndexOf('.');
    var m_name = '#m_' + path.substring(s+1, e);
    $(m_name).addClass("active");
});